﻿// (c) Copyright slimCODE Software Inc. - www.slimcode.com
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System;
using System.Collections.Generic;
using System.Text;
using SlimCode.Windows.Forms.Mobile;

namespace SlimCode.SlimPasswords
{
  internal class PasswordDigitsOptionView : BooleanOptionView, IOptionView
  {
    public PasswordDigitsOptionView()
      : base( ImageCache.Unchecked, ImageCache.Checked, "Use digits", Program.Settings.PasswordScheme.Digits )
    {
    }

    #region IOptionView Members

    public void Apply()
    {
      Program.Settings.PasswordScheme.Digits = this.Value;
    }

    public void Cancel()
    {
    }

    public void OnClicked( IScreenHost host, IScreen screen )
    {
      this.Value = !this.Value;
    }

    #endregion
  }
}
